package com.peng.user.controller;

import com.peng.pojo.UserInfoVO;
import com.peng.web.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author： Peng
 * @date： 2024/6/24
 * @version: 1.0
 */
@RestController
@RequestMapping("/user")
@Slf4j
@Api(tags = "用户服务接口")
public class UserController {

    @ApiOperation("获取用户信息")
    @GetMapping("/info/{userId}")
    public JsonResult getUserInfo(@PathVariable("userId") Long userId){
        log.debug("获取用户信息，userId:{}",userId);
        UserInfoVO userInfoVO = new UserInfoVO();
        userInfoVO.setCarId(11);
        return JsonResult.ok(userInfoVO,"获取用户信息成功");
    }
}
